package com.qj.yantaishan.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qj.yantaishan.domain.CateGory;
import com.qj.yantaishan.mapper.CateGoryMapper;
import com.qj.yantaishan.service.CateGoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.List;

@SuppressWarnings("all")
@Service
@Primary
public class CateGoryServicelmpl extends ServiceImpl<CateGoryMapper, CateGory> implements CateGoryService {
    @Autowired
    private CateGoryMapper cateGoryMapper;

    /**
     * 查所有
     * */
    @Override
    public List<CateGory> selectCateGory() {
        return cateGoryMapper.selectnews();
    }

    /**
     * @根据id查
     * */
    @Override
    public List<CateGory> selectCateGoryId(Integer id) {
        return cateGoryMapper.selectnewsId(id);
    }

    @Override
    public int updateNews(CateGory cateGory) {
        return cateGoryMapper.updateNews(cateGory);
    }
}
